﻿using Bot.Dynamics365.Model;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Bot.Dynamics365
{
    public interface IDynamics365Service
    {
        Task<Dynamics365Response> GetDynamics365EntitysAsync(AzureAD azure);
        Task<Dynamics365Response> GetDynamics365FieldsAsync(AzureAD azure, string entity);
        /// <summary>
        /// use in query reference entity
        /// </summary>
        /// <param name="azure"></param>
        /// <param name="xml"></param>
        /// <returns></returns>
        Task<Dynamics365Response> QueryAsync(AzureAD azure, string entitySetName, string xml);
        Task<Dynamics365Response> QueryFirstAsync(AzureAD azure, string entitySetName, string xml);
        Task<Dynamics365Response> SearchFirstAsync(AzureAD azure, SearchInput input);
        Task<Dynamics365Response> CreateEntityAsync(AzureAD azure, CreateEntityInput input);
    }
}
